Integrand size = 21, antiderivative size = 29 \[ \int \frac {\cot ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\text {arctanh}(\cos (c+d x))}{a d}-\frac {\cot (c+d x)}{a d} \]
[Out]
Time = 0.04 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2785, 3852, 8, 3855} \[ \int \frac {\cot ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\text {arctanh}(\cos (c+d x))}{a d}-\frac {\cot (c+d x)}{a d} \]
[In]
[Out]
Rule 8
Rule 2785
Rule 3852
Rule 3855
Rubi steps \begin{align*} \text {integral}& = -\frac {\int \csc (c+d x) \, dx}{a}+\frac {\int \csc ^2(c+d x) \, dx}{a} \\ & = \frac {\text {arctanh}(\cos (c+d x))}{a d}-\frac {\text {Subst}(\int 1 \, dx,x,\cot (c+d x))}{a d} \\ & = \frac {\text {arctanh}(\cos (c+d x))}{a d}-\frac {\cot (c+d x)}{a d} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(69\) vs. \(2(29)=58\).
Time = 0.14 (sec) , antiderivative size = 69, normalized size of antiderivative = 2.38 \[ \int \frac {\cot ^2(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\csc \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {1}{2} (c+d x)\right ) \left (\cos (c+d x)+\left (-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right ) \sin (c+d x)\right )}{2 a d} \]
[In]
[Out]
Time = 0.16 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.45
method | result | size |
parallelrisch | \(\frac {-\cot \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d a}\) | \(42\) |
derivativedivides | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{2 d a}\) | \(44\) |
default | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{2 d a}\) | \(44\) |
risch | \(-\frac {2 i}{a d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d a}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d a}\) | \(63\) |
norman | \(\frac {\frac {\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}{d a}-\frac {1}{2 a d}+\frac {\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d a}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}\) | \(91\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 62 vs. \(2 (29) = 58\).
Time = 0.28 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.14 \[ \int \frac {\cot ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 2 \, \cos \left (d x + c\right )}{2 \, a d \sin \left (d x + c\right )} \]
[In]
[Out]
\[ \int \frac {\cot ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\int \frac {\cos ^{2}{\left (c + d x \right )} \csc ^{2}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 70 vs. \(2 (29) = 58\).
Time = 0.21 (sec) , antiderivative size = 70, normalized size of antiderivative = 2.41 \[ \int \frac {\cot ^2(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\frac {2 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac {\cos \left (d x + c\right ) + 1}{a \sin \left (d x + c\right )} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{2 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 65 vs. \(2 (29) = 58\).
Time = 0.42 (sec) , antiderivative size = 65, normalized size of antiderivative = 2.24 \[ \int \frac {\cot ^2(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\frac {2 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a} - \frac {\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a} - \frac {2 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1}{a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{2 \, d} \]
[In]
[Out]
Time = 9.60 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.86 \[ \int \frac {\cot ^2(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )+\mathrm {cot}\left (c+d\,x\right )}{a\,d} \]
[In]
[Out]